#pragma once
#include "afxcmn.h"

#include <vector>
#include "Utils.h"

#include <boost/thread/mutex.hpp>
// CDlgListInfo dialog

class CDlgListInfo : public CDialogEx
{
	DECLARE_DYNAMIC(CDlgListInfo)

public:
	CDlgListInfo(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlgListInfo();

// Dialog Data
	enum { IDD = IDD_LIST_DLG };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
    CListCtrl m_list;
    virtual BOOL OnInitDialog();
    void InitListCtrl();
    afx_msg void OnSize(UINT nType, int cx, int cy);

    void PushData(ItemInfo& stInfo);
    void UpdateList();
    int GetSelId();
    int m_iEachPage;
    int m_iCurPage;
    boost::mutex m_mtLock;
private:
    
    vector<ItemInfo> m_vecInfo;
    
public:
    afx_msg void OnNMDblclkList1(NMHDR *pNMHDR, LRESULT *pResult);
    void ClearData();
};
